package com.example.demo.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 全局异常处理
 */
@Configuration
public class GlobalExceptionHandler {

//    private static final Logger logger

    @ExceptionHandler(Exception.class)
    public void handleException(Exception e){

    }

    @ExceptionHandler(IllegalStateException.class)
    public void illegalStateException(IllegalStateException e) {

    }
    @ExceptionHandler(NullPointerException.class)
    public void NullPointerException(NullPointerException e) {

    }
}
